package com.party.core.dao.read.analysis;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.analysis.StatisticsEventFlow;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @program: party-temp
 * @description: 统计事件流程数据读取
 * @author: Huaqunhao
 * @create: 2018-08-01 10:53
 **/
@Repository
public interface StatisticsEventFlowReadDao extends BaseReadDao<StatisticsEventFlow> {
    List<StatisticsEventFlow> getByUniqueCode(@Param("uniqueCode") String uniqueCode);

    List<StatisticsEventFlow> findByEventId(@Param("eventId") String eventId,
                                            @Param("params") Map<String, Object> params);

    StatisticsEventFlow getNewFlow(@Param("uniqueCode") String uniqueCode);

    List<StatisticsEventFlow> queryEventBydate(@Param("startDate") String startDate, @Param(value = "endDate") String endDate,
                                               @Param("pageNum") int pageNum, @Param("pageSize") int pageSize);

    int queryEventTotalNumByDate(@Param("startDate") String startDate, @Param(value = "endDate") String endDate);

    /**
     * @Description: 通过时间查询事件详情表数据
     * @Param:
     * @return:
     * @Author: Hua Qunhao
     * @Date: 2018/12/25
     */
    List<StatisticsEventFlow> queryEventFlowListByDate(@Param("queryDate") String queryDate, Page page);

    /**
     * @Description: 通过时间查询事件详情表数量
     * @Param:
     * @return:
     * @Author: Hua Qunhao
     * @Date: 2018/12/25
     */
    int queryEventFlowCountByDate(@Param("queryDate") String queryDate, @Param("total") Integer total);


}
